/**
//////////////////////////////////
*Message.java
*This class defining classes that represent message of simulations
*model.messages.Message
*GPLv3
*@author Ferlin Alessandro
*2012.06.11
//////////////////////////////////
*/


package model.messages;

import java.awt.geom.Point2D;

public class Message implements MessageInterface{
	private int idCreator;
	private Point2D.Float posCreator=new Point2D.Float();
	private Point2D.Float destination=new Point2D.Float();
	

	/**
	 * constructor
	 * @param id
	 *            creator Id
	 * @param xOrigin
	 *            creator's x coordinate
	 * @param yOrigin
	 *            creator's y coordinate
	 */
	public Message(LocationClaim message, float x, float y) {
		idCreator = message.getIdCreator();
		posCreator=message.getPosition();
		destination.x=x;
		destination.y=y;
	}
	
	/**
	 * Return the id of the creator node
	 * @return creator Id
	 */	
	@Override
	public int getIdCreator() {
		return idCreator;
	}

	/**
	 * Return the Position of the creator node
	 * @return creator position Poind2D.Float
	 */
	@Override
	public Point2D.Float getPosition(){
		return posCreator;
	}
	
	/**
	 * Return the destination of the message
	 * @return destination position Poind2D.Float
	 */
	public Point2D.Float getDestination(){
		return destination;
	};
	

}
